<?php 
session_start();
if ( empty( $_SESSION['user'] ) ) {
    
    header( "Location: index.php?msg=mustlogin" );
}

include 'partials/header.php'; ?>
<div class="jumbotron">
    <h1>CS:GO  Visualiser une strat&eacute;gie</h1>
    <h3>Visualisez les strat&eacutegies que vous avez cr&eacute&eacutees</p>    
</div>        
<div class="alert alert-info alert-dismissable">
    Choissisez d'abord une strat&eacute;gie dans la liste ci-dessous
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
</div>
<div class="col-lg-3">                                        
    <div class="btn-group">
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
            Choisir une strat&eacute;gie <span class="caret"></span>
        </button>
            <ul class="dropdown-menu" role="menu">
                <li><a href="#">Strat&eacute;gie Demo 1</a></li>
                <li id="demo"><a href="#" onclick="loadPlayers();">Strat&eacute;gie Demo 2</a></li>
                <li><a href="#">Strat&eacute;gie Demo 3</a></li>
            </ul>
    </div>
    <div class="panel panel-primary voffset4" name="listBoxContainer" id="listBoxContainer">
        <div class="panel-heading">
            <h3 class="panel-title">Liste des joueurs</h3>
        </div>
        <div class="panel-body">
            <div class="list-group" id="playerListView" name="playerListView"></div>
        </div>
    </div>
</div>
<div class="col-lg-9">
    <?php
    // Get map name from listbox
    if (!empty($_GET['map'])) {
        switch ($_GET['map']) {
            case "mirage":
                $map_name = 'media/de_mirage.png';
                break;
            case "season":
                $map_name = 'media/de_season.png';
                break;
            case "inferno":
                $map_name = 'media/de_inferno.png';
                break;
        }
    }
    ?>
    <canvas style="background-image: url('<?php echo "media/strat_demo.png"; ?>'); height: 600px; width: 600px;" onclick='editStrategy(event, this)' id='myCanvas' class="hidden">
    </canvas>
    <div style="position:absolute;" id="choicesbox"></div>
</div>

<script type="text/javascript">
$(function(){
    
});
</script>
<!-- Load the Paper.js library -->
<script type="text/javascript" src="js/paper.js"></script>
<!-- Define inlined PaperScript associate it with myCanvas -->
<script type="text/paperscript" canvas="myCanvas" >

</script>

<?php include 'partials/footer.php'; ?>